<?php

namespace app\admin\validate;
//TODO:删除use示例

class AuthGroup extends AdminBase
{

    // 验证规则
    protected $rule = [
        'id'       => 'require',
        'name'     => 'require',
        'module'   => 'require',
        'describe' => 'require',
        'status'   => 'require',
        'rules'    => 'require',
    ];

    // 验证提示
    protected $message = [
        'id.require'       => '分组id不能为空',
        'name.require'     => '角色名不能为空',
        'module.require'   => '模块不能为空',
        'describe.require' => '描述不能为空',
        'status.require'   => '状态不能为空',
        'rules.require'    => '权限不能为空',
    ];

    // 应用场景
    protected $scene = [
        'add'    => ['name',  'describe'],
        'update' => ['id'],
        'delete' => ['id'],
    ];


}
